package com.paypal.android.a;

import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public final class b extends FilterOutputStream
{
  private boolean a;
  private int b;
  private byte[] c;
  private int d;
  private int e;
  private boolean f;
  private byte[] g;
  private boolean h;
  private int i;
  private byte[] j;

  public b(OutputStream paramOutputStream, int paramInt)
  {
    super(paramOutputStream);
    int m;
    if ((paramInt & 0x8) != 8)
    {
      m = k;
      this.f = m;
      if ((paramInt & 0x1) != k)
        break label105;
      label32: this.a = k;
      if (!this.a)
        break label110;
    }
    label105: label110: for (int n = 3; ; n = 4)
    {
      this.d = n;
      this.c = new byte[this.d];
      this.b = 0;
      this.e = 0;
      this.h = false;
      this.g = new byte[4];
      this.i = paramInt;
      this.j = a.a(paramInt);
      return;
      m = 0;
      break;
      k = 0;
      break label32;
    }
  }

  public final void close()
  {
    if (this.b > 0)
    {
      if (this.a)
      {
        this.out.write(a.a(this.g, this.c, this.b, this.i));
        this.b = 0;
      }
    }
    else
    {
      super.close();
      this.c = null;
      this.out = null;
      return;
    }
    throw new IOException("Base64 input not properly padded.");
  }

  public final void write(int paramInt)
  {
    if (this.a)
    {
      byte[] arrayOfByte2 = this.c;
      int n = this.b;
      this.b = (n + 1);
      arrayOfByte2[n] = ((byte)paramInt);
      if (this.b >= this.d)
      {
        this.out.write(a.a(this.g, this.c, this.d, this.i));
        this.e = (4 + this.e);
        if ((this.f) && (this.e >= 76))
        {
          this.out.write(10);
          this.e = 0;
        }
        this.b = 0;
      }
    }
    do
    {
      do
      {
        return;
        if (this.j[(paramInt & 0x7F)] <= -5)
          break;
        byte[] arrayOfByte1 = this.c;
        int k = this.b;
        this.b = (k + 1);
        arrayOfByte1[k] = ((byte)paramInt);
      }
      while (this.b < this.d);
      int m = a.a(this.c, 0, this.g, 0, this.i);
      this.out.write(this.g, 0, m);
      this.b = 0;
      return;
    }
    while (this.j[(paramInt & 0x7F)] == -5);
    throw new IOException("Invalid character in Base64 data.");
  }

  public final void write(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
  {
    for (int k = 0; k < paramInt2; k++)
      write(paramArrayOfByte[(paramInt1 + k)]);
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     com.paypal.android.a.b
 * JD-Core Version:    0.6.2
 */